package com.homepage.service.mapper;

import com.homepage.domain.Partner;
import com.homepage.service.dto.PartnerDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * Mapper for the entity {@link Partner} and its DTO {@link PartnerDTO}.
 */
@Mapper(componentModel = "spring")
public interface PartnerMapper extends EntityMapper<PartnerDTO, Partner> {
    @Mapping(target = "company.id", source = "companyId")
    Partner toEntity(PartnerDTO dto);

    @Mapping(target = "companyId", source = "company.id")
    PartnerDTO toDto(Partner entity);

}
